package com.pearl.jacksoncore.demo.pojo;

import java.util.List;

/**
 * @author TD
 * @version 1.0
 * @date 2024/3/18
 */
public class User {
    // 用户ID
    private Long id;
    // 姓名
    private String name;
    // 年龄
    private Integer age;
    // 所属机构
    private Org org;
    // 角色列表

    private List<Role> roleList;
    // 省略 getter\setter..........

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Org getOrg() {
        return org;
    }

    public void setOrg(Org org) {
        this.org = org;
    }

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", org=" + org +
                ", roleList=" + roleList +
                '}';
    }
}
